Bentley OpenUtilities CONNECT Edition Help

To Recreate a Replica for a Lost Laptop

Make sure the following applications are running on the Mobile Server machine:

  • Mobile Server
  • Job Scheduler
Note: For Instructions on how to run these applications, see Start the Mobile Server on Mobile Server Machine.
The instructions for this procedure are identical to those listed in Section 2, except there is an additional task to initialize the next valid identifiers for the Workflow Manager User on each table and "NewInstall" must be unchecked while running SequenceGenerator. Both the new tasks are highlighted in Step 4 below. The additional Bentley provided utility (IdGen) generates the valid ids and populates the NextTableId table. Each record in NextTableId consists of a table name, user ID, and the next valid Id.

Step 1: Unsubscribe the user

  1. Remove the snapshot references corresponding to the laptop from the Master database.
  2. At the command prompt, run the UNSUBSCRIBEUSER.BAT utility, from ..\Program Files\Bentley\UtilitiesDesigner\, with the following parameters. Use parameters in the order specified and use a space to separate each value.
  3. Cmd:\> UnSubscribeUser <Server Name> <Master DB Instance> <Master User> <Master Password> <Repository DB Instance> <Repository User> <Repository Password> <Unique Name> <Workflow Manager Username>

    Where:

    • Host name of the Master Oracle Server database
    • Oracle SID of the Master database
    • Username for connecting to Master database
    • Password for the Master User
    • Oracle SID of the Repository database (Usually the same as Master database)
    • Username for Repository user (Usually MOBILEADMIN)
    • Password for the Repository User
    • A name for the Workflow Manager Replication Publication
      Note: This name must be only two characters.
    • Workflow Manager user name of the user who is going to the use the replication database.
      Note: This user name must exist in the Userlogin table of the Master database and in the Mobile Server prior to running the batch file.

    For Example: Cmd:\> UnSubscribeUser geobox elecxm chdata chadmin elecxm mobileadmin chadmin ED administrator

Step 2: Subscribe the users to the Replication Publication

  1. At the command prompt, run the SUBSCRIBEUSER.BAT utility, from ..\Program Files\Bentley\UtilitiesDesigner\bin, with the following parameters. Use parameters in the order specified and use a space to separate each value.
  2. Cmd:\> SubscribeUser <Server Name> <Master DB Instance> <Master User> <Master Password> <Repository DB Instance> <Repository User> <Repository Password> <Unique Name (ED)> <EDUsername>

    Where:

    • Host name of the Master Oracle Server database
    • Oracle SID of the Master database
    • Username for connecting to Master database
    • Password for the Master User
    • Oracle SID of the Repository database (Usually the same as Master database)
    • Username for Repository user (Usually MOBILEADMIN)
    • Password for the Repository User
    • A name for the ED Replication Publication
      Note: This name must be only two characters.
    • ED user name of the user who is going to the use the replication database.
      Note: This user name must exist in the Userlogin table of the Master database and in the Mobile Server prior to running the batch file.
    For Example: Cmd:\> SubscribeUser geobox elecxm chdata chadmin elecxm mobileadmin chadmin ED administrator
At this point, you have completed recreating the replication publication and subscribing the users.

Step 3: Create Oracle Client ODBC DSN

  1. Setup the ODBC System DSN.Note: select “Oracle in OraDb10g_home1” Driver “v10.02.00.01”.
  2. Data Source Name: CHDATAMASTER Data Source Service Name: Always points to the Oracle Server SID.

Step 4: Create Laptop Replication Files

  1. At the command prompt, run the IdGen.exe utility, from ..\Program Files \Bentley\ExpertDesigner\bin, with the following parameters to initialize the next valid sequence numbers. Use parameters in the order specified and use a space to separate each value.
  2. Cmd:\> IdGen <ED User>

    Workflow Manager User name of the user who is going to the use the replication database.

    Note: This user name must exist in the Userlogin table.
    Note: Edit the POLITE.INI located in C:\Windows directory.

    Edit the file POLITE.INI like this: [All Databases] MaxSharedMemSize=256 [SYNC] AUTO_COMMIT_COUNT=50

    Note: If you have any CU updates copy the CU data text files to UtilitiesDesigner directory before running REPLICA.BAT file. You can also load CU data later on using LOADDATA.BAT (See Propagating CU Updates from Master database to Oracle Lite for further details).
  3. At the command prompt, run the REPLICA.BAT utility, from ..\Program Files\Bentley\UtilitiesDesigner, with the following parameters. Use parameters in the order specified and use a space to separate each value.
  4. Cmd:\> Replica <OracleLite_Home> < Workflow Manager Username> < Workflow Manager Username password in Mobile Server> <Mobile Server name> <proxy server> <proxy port>

    Where:

    • Directory where you have the Oracle 10g Lite installed
    • Workflow Manager User name of the user who is going to the use the replication database.
      Note: This user name must exist in the Userlogin table of the Master database and in the Mobile Server prior to running the batch file. (See Creating users in Mobile Server for further details).
    • Password for the above user on the Mobile Server
    • Mobile Server machine name
    • [Optional] Proxy Server name
    • [Optional] Proxy Port number

    For Example: Cmd:\> Replica C:\Oracle\OraLite10g administrator chadmin MACHINE1 [PROXY1] [8080]

    The REPLICA batch file performs several steps including the creation of the snapshot where each table in the Master database is replicated, and creation of the indexes and views. After each step, the program will pause to give the System Administrator the opportunity to review any errors that may have occurred, the user can press <Enter> to continue execution or <Ctrl + C> to exit the batch program. One of the steps in the program is to display an interactive Windows program providing the capability to generate a sequence number. After the sequence numbers are generated, the sequences will be automatically created in the replica database.

  5. In the Sequence Generator Window:
    • Select the User's name used as a parameter to run REPLICA.BAT
    • Uncheck the "New Install" check box (i.e., it must not be checked)
    • Select Next
    • Select Finish to generate the sequence
    • Manually create the CHDATALITE DSN. (Refer to instructions in 1st part of Section 3.0 Step 4)*
    • Exit the Application when it has finished generating the sequence
    Note: *This step will be eliminated when Sequence Generator application is modified to create the CHDATALITE DSN.
  6. After the sequences are created, the batch program will continue to create views, indexes, etc.
When the program completes, the <Publication Name>.ODB file will contain the replicated database. This file will be created in the <Install directory>\Mobile\OLDB40\<Username>\.